#pragma once
#ifndef _KH_ENGINE_UTILS_H
#define _KH_ENGINE_UTILS_H
#include <Kharlia/Engine/Common.h>

namespace kharlia { namespace engine {

//class public_streambuf: public std::streambuf {
//public:
//    char* getreadbuf() const { return eback(); }
//    char* getwritebuf() const { return pbase(); }
//};
//
//template <class T>
//inline
//void StreamRead(const std::istream& stream, T& dest) {
//    stream.read(reinterpret_cast<char*>(&dest), sizeof(dest));
//}
//
//template <class T>
//inline
//void StreamRead(const std::istream& stream, T& dest, std::streamsize size) {
//    stream.read(reinterpret_cast<char*>(&dest), size);
//}
//
//template <class T>
//inline
//void StreamWrite(std::ostream& stream, const T& src) {
//    stream.write(reinterpret_cast<const char*>(&src), sizeof(src));
//}
//
//template <class T>
//inline
//void StreamWrite(std::ostream& stream, const T& src, std::streamsize size) {
//    stream.write(reinterpret_cast<const char*>(&src), size);
//}

}}

#endif